<?php

/**
 * @Author: Eden
 * @Date:   2019-07-01 16:54:18
 * @Last Modified by:   Eden
 * @Last Modified time: 2019-07-01 17:21:11
 */
namespace App\Transformers;

use App\Models\Files;
use League\Fractal\TransformerAbstract;

class Filetransformer extends TransformerAbstract
{
	public function transform(Files $files)
	{
		return [
			'id' => $files->id,
			'title' => $files->title,
			'size' => $files->size,
			'extension' => $files->extension,
			'path' => $files->path,
			'created_at' => $files->created_at->toDateTimeString(),
			'updated_at' => $files->updated_at->toDateTimeString() 
		];
	}
}